<?php include 'functions.php'; echo $html_doctype; ?>
<html>
<head>
<title> Scratch Resources | Share!</title>
<?php
	echo $html_meta;
	echo $html_css;
	echo $html_scripts;
?>
</head>

<body>
<!-- HEADER -->
<div id="maincontainer">

	<?php
	include 'header.php';
	?>
	
	<div class="box_fullwidth">
	
	<?php
	$t = $_GET['t'];
	if ($t=='project') {
	?>
	<!-- SCRATCH PROJECT -->
	<h1>Share a Scratch Tutorial Project</h1>
	<h2>Step 1: Create your Project</h2>
	First, create your project in the Scratch program (Not installed yet? Download from <a href="http://scratch.mit.edu">the Scratch website</a>).
	Try to think about the following things when creating your project.<br><br>
	<ul>
	<li> <b>Is it clear what you're talking about?</b> Try to insert images, screenshots, ... Some piece of plain text is not easy to understand...
	<li> <b>Can users easily browse your project?</b> You might want to add buttons to go forward and backward, or allow control with the arrow keys or the spacebar. When your project runs like a movie, people can't take a break to try things out. Not everyone might understand english as well as you do =)
	<li> <b>Isn't the project too big?</b> Try to keep the project file size as low as possible. Try not to include any music, it might really slow down the viewer's computer, making it very difficult to watch your tutorial and try things out.
	<li> <b>Is it appropriate for all ages?</b> Since you'll be sharing your project on the Scratch website, Scratch's Terms of Use apply. Projects have to be appropriate for everyone, from different ages or different cultures.
	</ul>
	<h2>Step 2: Share on the Scratch website</h2>
	Just as you would usually do, click 'Share'>>'Share this project online...' in the Scratch program in order to share it on the Scratch website.<br>
	<br>
	<h2>Step 3: Submit your project!</h2>
	Once you did all that, add your project to the <a href="http://scratch.mit.edu/galleries/view/70848">Scratch Tutorial Projects</a> . They will be added automatically to Scratch Resources.<br>
	<?php
	} elseif ($t=='tutorial') {
	?>
	<!-- TUTORIAL EDITOR -->
	<h1>Write a Tutorial</h1>
	<script type="text/javascript" src="/js/tiny_mce/tiny_mce.js"></script>
	<script type="text/javascript">
		tinyMCE.init({
			// General options
			mode : "textareas",
			theme : "advanced",
			plugins : "safari,pagebreak,style,layer,table,save,advhr,advimage,advlink,emotions,iespell,inlinepopups,insertdatetime,preview,media,searchreplace,print,contextmenu,paste,directionality,fullscreen,noneditable,visualchars,nonbreaking,xhtmlxtras,template,wordcount",
	
			// Theme options
			theme_advanced_buttons1 : "save,newdocument,|,bold,italic,underline,strikethrough,|,justifyleft,justifycenter,justifyright,justifyfull,formatselect",
			theme_advanced_buttons2 : "cut,copy,paste,pastetext,|,search,replace,|,bullist,numlist,|,outdent,indent,blockquote,|,undo,redo,|,link,unlink,anchor,image,cleanup,|,insertdate,inserttime,preview,|,forecolor,backcolor",
			theme_advanced_buttons3 : "tablecontrols,|,hr,removeformat,visualaid,|,sub,sup,|,charmap,emotions,advhr,|fullscreen,|,attribs",
			theme_advanced_toolbar_location : "top",
			theme_advanced_toolbar_align : "left",
			theme_advanced_statusbar_location : "bottom",
			theme_advanced_resizing : true,
			theme_advanced_resize_horizontal : false,
	
			// Example content CSS (should be your site CSS)
			content_css : "/css/style.css",
	
			// Drop lists for link/image/media/template dialogs
			template_external_list_url : "lists/template_list.js",
			external_link_list_url : "lists/link_list.js",
			external_image_list_url : "lists/image_list.js",
			media_external_list_url : "lists/media_list.js",
	
			// Replace values for the template plugin
			template_replace_values : {
				username : "Some User",
				staffid : "991234"
			}
		});
	</script>
	<textarea id="elm1" name="elm1" rows="15" cols="80" style="width: 750px; height: 600px;">
				&lt;p&gt;
					This is some example text that you can edit inside the &lt;strong&gt;TinyMCE editor&lt;/strong&gt;.
				&lt;/p&gt;
				&lt;p&gt;
				Nam nisi elit, cursus in rhoncus sit amet, pulvinar laoreet leo. Nam sed lectus quam, ut sagittis tellus. Quisque dignissim mauris a augue rutrum tempor. Donec vitae purus nec massa vestibulum ornare sit amet id tellus. Nunc quam mauris, fermentum nec lacinia eget, sollicitudin nec ante. Aliquam molestie volutpat dapibus. Nunc interdum viverra sodales. Morbi laoreet pulvinar gravida. Quisque ut turpis sagittis nunc accumsan vehicula. Duis elementum congue ultrices. Cras faucibus feugiat arcu quis lacinia. In hac habitasse platea dictumst. Pellentesque fermentum magna sit amet tellus varius ullamcorper. Vestibulum at urna augue, eget varius neque. Fusce facilisis venenatis dapibus. Integer non sem at arcu euismod tempor nec sed nisl. Morbi ultricies, mauris ut ultricies adipiscing, felis odio condimentum massa, et luctus est nunc nec eros.
				&lt;/p&gt;
	</textarea>

	<?php
	} else {
	?>
	<!-- INTRODUCTION -->
	<h1>Share</h1>
	Do you want to upload your own stuff to this site?<br>
	<br>
	It's easy, there's no need to signup or register, just share it!<br>
	Your uploaded files will pass the Scratchresources team before being shown on in public, in order to prevent spam. 
	This means that your file will not be shown immediately after it's uploaded, it might take several days to pass judgement.
	Depending on the type of file you uploaded, it might take even longer.<br>
	<br>
	All resources uploaded to this site are supposed to be used by other Scratch members. When you upload a file, you agree everyone can use it in his or her Scratch project.<br>
	<br>
	<a href="/upload">Upload a Sprite, Script, Sound or Background &gt;&gt; </a><br>
	<a href="/share?t=project">Upload a Scratch Tutorial project &gt;&gt; </a><br>
	<?php 
	//<a href="/share?t=tutorial">Write a Scratch Tutorial &gt;&gt; </a><br>
	}
	echo '</div>'."\n";
	include('footer.php');
	?>
</div>
</body>

</html>